Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples: Make utils/winit_app.rs a path-referenced module again to fix autoformatting #227

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

MarijnS95
Copy link
Member

Via include!() rustfmt doesn't know that this file belongs to the current project and doesn't autoformat it. Furthermore, jump-to-symbol likely doesn't play that well with include!().

Without creating a lib.rs file in utils/, use #[path] to reference the existing file without following a module hierarchy.

Note that the file remains in the utils/ folder as that doesn't get picked up by autoexamples.

…to fix autoformatting

Via `include!()` `rustfmt` doesn't know that this file belongs to the
current project and doesn't autoformat it. Furthermore, jump-to-symbol
likely doesn't play that well with `include!()`.

Without creating a `lib.rs` file in `utils/`, use `#[path]` to reference
the existing file without following a `mod`ule hierarchy.

Note that the file remains in the `utils/` folder as that doesn't get
picked up by `autoexamples`.
@MarijnS95 MarijnS95 force-pushed the example-utils-mod branch from cb3e3e8 to 0475574 Compare July 10, 2024 13:03
Copy link
Member

@notgull notgull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@notgull notgull merged commit 0264cba into rust-windowing:master Jul 15, 2024
38 checks passed
@MarijnS95 MarijnS95 deleted the example-utils-mod branch July 15, 2024 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants